<%@page import="java.util.Date"%>
<%@page import="fun.wlfj.vo.User"%>
<%@page import="fun.wlfj.factory.CashSystemFactory"%>
<%@page import="fun.wlfj.vo.PayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<% String which = "汇总报表"; %>
<%@ include file="header.jsp"%>
<!-- CONTENT -->
<section id="content">
	<div class="page dashboard-page">
		<!-- bradcome -->
		<!-- row -->
		<section class="boxs">
			<div class="boxs-header">
				<h3 class="custom-font hb-blue">
					<strong>已完成 </strong>汇总工作报表
				</h3>

			</div>
			<div class="boxs-body">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>#</th>
							<th>用户ID</th>
							<th>处方ID</th>
							<th>支付金额</th>
							<th>处方创建时间</th>
							<th>支付时间</th>
						</tr>
					</thead>
					<tbody>
					<%
					List<PayList> list1 = CashSystemFactory.getPayListDao(new User()).getPayLists(2);
					int cnt = 1;
					for(PayList p : list1){
					%>
						<tr>
							<td><%=cnt ++ %></td>
							<td><%=String.format("US%06d", p.getUserID()) %></td>
							<td><%=String.format("PL%06d", p.getPayListID()) %></td>
							<td><%=p.getPayCash() %>¥</td>
							<td><%=p.getPayDate() %></td>
							<td><%=CashSystemFactory.getPayBackDao().getPayBackByID(p.getPayListID()).getPayDate()  %></td>
						</tr>
						<%} %>
					</tbody>
				</table>
			</div>
		</section>
		<section class="boxs">
			<div class="boxs-header">
				<h3 class="custom-font hb-green">
					<strong>待支付 </strong>汇总工作报表
				</h3>

			</div>
			<div class="boxs-body">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>#</th>
							<th>用户ID</th>
							<th>处方ID</th>
							<th>支付金额</th>
							<th>处方创建时间</th>
							<th>状态</th>
						</tr>
					</thead>
					<tbody>
					<%
					List<PayList> list2 = CashSystemFactory.getPayListDao(new User()).getPayLists(1);
					cnt = 1;
					for(PayList p : list2){
					%>
						<tr>
							<td><%=cnt ++ %></td>
							<td><%=String.format("US%06d", p.getUserID()) %></td>
							<td><%=String.format("PL%06d", p.getPayListID()) %></td>
							<td><%=p.getPayCash() %>¥</td>
							<td><%=p.getPayDate() %></td>
							<td>待支付</td>
						</tr>
						<%} %>
					</tbody>
				</table>
			</div>
		</section>
		<section class="boxs">
			<div class="boxs-header">
				<h3 class="custom-font hb-cyan">
					<strong>已退款 </strong>汇总工作报表
				</h3>

			</div>
			<div class="boxs-body">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>#</th>
							<th>用户ID</th>
							<th>处方ID</th>
							<th>支付金额</th>
							<th>处方创建时间</th>
							<th>退款时间</th>
						</tr>
					</thead>
					<tbody>
						<%
					List<PayList> list3 = CashSystemFactory.getPayListDao(new User()).getPayLists(4);
					cnt = 1;
					for(PayList p : list3){
					%>
						<tr>
							<td><%=cnt ++ %></td>
							<td><%=String.format("US%06d", p.getUserID()) %></td>
							<td><%=String.format("PL%06d", p.getPayListID()) %></td>
							<td><%=p.getPayCash() %>¥</td>
							<td><%=p.getPayDate() %></td>
							<td><%=CashSystemFactory.getPayBackDao().getPayBackByID(p.getPayListID()).getPayDate()  %></td>
						</tr>
						<%} %>
					</tbody>
				</table>
			</div>
		</section>
	</div>
</section>
<%@ include file="/footer.jsp"%>